fix: recovery from archives with sparse index shards - #3
Merged
YordiLorenzo merged 2 commits intoSep 8, 2026
Merged
Conversation
arjungopisetty
marked this pull request as ready for review
September 5, 2026 07:10
arjungopisetty
marked this pull request as draft
September 5, 2026 07:12
arjungopisetty
marked this pull request as ready for review
September 5, 2026 07:15
YordiLorenzo
pushed a commit
that referenced
this pull request
Sep 8, 2026
The docstring asserted the invariant that #3 disproved, and it was the reasoning that led me to compute offsets from list position in the first place. Record what a real archive actually looks like so the next person does not re-derive it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-s,-n, and--samplefordoctor.Root Cause
The affected archive has gaps in its shard numbering:
file_chunk1.indexis missing shard 27 andfile_chunk4.indexis missing shard 7.Catpreviously compacted discovered shards into a contiguous list, so every shard after a gap was addressed 8 MiB too early and valid MP4 chunk lists were interpreted as invalid records.The reader now derives logical offsets from each shard numeric filename.
Validation
MVI_6400.MP4: 74,396,840 bytes rebuilt exactlyCloses #1